{include file="admin/header.htm"}
<form id="loginform" method="post" action="{$smarty.const.ADMIN_NAME}?m=admin&c=login&a=dologin">
<div id="main">
    <div id="login_box">
        <ul>
            <li>用户名：<input name="username" type="text" style="width:130px;"></li>
            <li>密　码：<input name="password" type="password" style="width:130px;"></li>
            <li style="padding-left:48px;">
                <input type="submit" name="dosubmit" value=" 登录 " class="btn">
                <input type="reset" name="reset" value=" 清除 " class="btn">
            </li>
            <li style="padding-left:48px;"><a href="{$smarty.const.ADMIN_NAME}?m=admin&c=login&a=qq"><img src="{geturl('/static/images/top_qq_login1.gif')}" border="0" style="vertical-align:middle;"/></a></li>
        </ul>
        
        <p id="tip" style="display:none;color:#ffffff;"></p>
    </div>
</div>
</form>
{include file="admin/footer.htm"}
<script type="text/javascript" src="{geturl('/static/js/jquery.form.js')}"></script>
<script type="text/javascript">
jQuery(document).ready(function() {
    jQuery('#loginform').ajaxForm({
        'success' : function(s) {
            if(s == '4') {
                location.href = '{$smarty.const.ADMIN_NAME}?m=admin&c=index';
                return false;
            } else {
                $('#tip').show();
                
                if(s == '1') {
                    $('#tip').html('已登陆！');
                } else {
                    var obj = eval('(' + s + ')');
                    if(obj.code == '2') {
                        $('#tip').html('密码尝试次数过多，请在' + obj.expire + '秒后再登陆！');
                    } else if(obj.code == '3') {
                        $('#tip').html('用户名或密码错误，还能尝试' + obj.nums + '次！');
                    }
                }
            }
        }
    });
});
</script>